﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Chapter05.View
{
    /// <summary>
    /// MousePositionWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MousePositionWindow : Window
    {
        public MousePositionWindow()
        {
            InitializeComponent();
        }

        private void StackPanel_MouseMove(object sender, MouseEventArgs e)
        {
            Point pt = e.GetPosition(this);
            lblInfo.Text = string.Format("窗口坐标：({0:000}, {1:000}) 设置无关单位 1/96像素", pt.X, pt.Y);
        }
    }
}
